#include <QtCore/QCoreApplication>

#include <iostream>
#include <string>
#include <bitset>
#include <fstream>
#include <vector>

#include "HexJudgerConsole.h"
#include "DummyVCSolver.h"

int main(int argc, char *argv[])
{
	DummyVCSolver::load_from_dir("D:/hex/edge_vc");

	char str1[1000];
	char str2[1000];
	int num;
	int win1 = 0;
	int win2 = 0;

	printf("enter path1: ");
	scanf("%s", str1);
	printf("enter path2: ");
	scanf("%s", str2);
	printf("enter times: ");
	scanf("%d", &num);

	for (int i = 0; i < num; i++)
	{
		HexJudgerConsole * a = new HexJudgerConsole(argc, argv);

		a->setPath(str1, str2);
		a->createEngine();
		a->connectEngineToSlots();
		a->startEngine();
		int win = a->startSimulation();
		if (win == 1)
			win1++;
		if (win == 2)
			win2++;

		printf("win1: %d, win2: %d\n", win1, win2);

		delete a;
	}

	getchar();
	getchar();

	return 0;
}
